function add(a,b){
    return a+b;
}
function subtraction(a,b){
    return a-b;
}
function multiplication(a,b){
    return a*b;
}
function division(a,b){
    if(b!=0){
        return a/b;
    }else throw "分母不能为0";
}

const { exit } = require('process');
const readline=require('readline');
const rl=readline.createInterface({
    input: process.stdin,
    output: process.stdout
});
let inputArr=[];
let i=0;
let x1;
let x2;
rl.on('line',function(input){
    inputArr.push(input);
    if(input=='#')exit();
    i++;
    if(i%3==0){
        x1=parseFloat(inputArr[i-3]);
        x2=parseFloat(inputArr[i-1]);
        if(x1==inputArr[i-3]&&x2==inputArr[i-1]){
            if(inputArr[i-2]=='+'){
                console.log(x1+'+'+x2+'='+add(x1,x2));
            }else if(inputArr[i-2]=='-'){
                console.log(x1+'-'+x2+'='+subtraction(x1,x2));
            }else if(inputArr[i-2]=='*'){
                    console.log(x1+'*'+x2+'='+multiplication(x1,x2));
            }else if(inputArr[i-2]=='/'){
                try {
                    console.log(x1+'/'+x2+'='+division(x1,x2));
                } catch (error) {
                    console.log(error);
                }
            }else console.log("请输入正确的运算符");
        }else console.log("请输入数字");
    }
})
